'use strict';
const db = uniCloud.database()
const dbCmd = db.command
exports.main = async (event, context) => {
	//event为客户端上传的参数
	console.log('event : ', event)
	// 链接云空间的template-user 名
	const collection = db.collection('template-user')
	// 新增add 接口  云函数
	// username: dbCmd.or(dbCmd.eq('tianyizheng'),dbCmd.eq('小刘同学'))
	const res = await collection.where({
		username:dbCmd.eq('tianyizheng')
		}).get()
	console.log(res,'99999')
	//返回数据给客户端
	return {
		code:200,
		data:res,
		msg:"请求成功"
	}
};
